<template>
  <view class="approval-item">
    <CommonHeader>离职申请</CommonHeader>
    <view class="approval-content">
      <CommonInfo approvalType="离职" />
      <view class="input-area">
        <Field label="交接人员" @getValue="getConnectEmployee" />
        <Field label="所属岗位" @getValue="getJob" />
        <BeforeDateSelect label="入职日期" @getSelectDate="getEntryDate" />
        <AfterDateSelect label="离职日期" @getSelectDate="getSeparationDate" />
        <Textarea label="离职原因" @getInputData="getSeparationReason" />
      </view>
      <ApprovalButton
        :warn="warn"
        :approvalType="'separation'"
        :procInfo="{
          connectEmployee: approval.connectEmployee,
          job: approval.job,
          entryDate: String(approval.entryDate),
          separationDate: String(approval.separationDate),
          separationReason: approval.separationReason,
        }"
      />
    </view>
    <van-toast id="van-toast" />
  </view>
</template>
<script src="./script.js"></script>
<style lang="less" src="./style.less"></style>
